luci-base: Fix using isActive in widget-change notification.
authorOldřich Jedlička <[email protected]>
Tue, 20 Oct 2020 18:15:30 +0000 (20:15 +0200)
committerOldřich Jedlička <[email protected]>
Fri, 30 Oct 2020 20:18:45 +0000 (21:18 +0100)
commitee9b3a4e9482222da41dfb884e6185d6180147f1
tree805039fce2d0628dab906afe71a1408c1cbdaa6c
parent6125c9178eca7ecf30bb7bfc5c472d533e55606f
luci-base: Fix using isActive in widget-change notification.

The `onchange` notification handler is called too early to be able to
evaluate other widget's `isActive()` status. Solve this by changing order
of event handling - first register/execute `map.checkDepends` and then
`onchange`.

Fixes: openwrt/luci#4516.
Signed-off-by: Oldřich Jedlička <[email protected]>
modules/luci-base/htdocs/luci-static/resources/form.js